﻿using System;

namespace LIMS.DALFactory
{
    /// <summary>
    /// 缓存策略接口
    /// </summary>
    internal interface ICacheStorage
    {
        /// <summary>
        /// 移除指定对象的缓存数据
        /// </summary>
        /// <param name="cacheKey">待移除的缓存键</param>
        void Remove(String cacheKey);
        /// <summary>
        /// 添加指定的键值到缓存
        /// </summary>
        /// <param name="cacheKey">待添加的缓存键</param>
        /// <param name="cacheValue">待添加的数据</param>
        void Add(String cacheKey, object cacheValue);

        /// <summary>
        /// 根据指定的键访问对应的缓存数据
        /// </summary>
        /// <typeparam name="T">指定的类型</typeparam>
        /// <param name="cacheKey">访问缓存的键</param>
        /// <returns>返回缓存中的缓存值</returns>
        T Get<T>(String cacheKey);
    }

}
